package homework.ooday03.animal;

public class Test {
    public static void main(String[] args) {
        Dog[] dogs = new Dog[2];
        dogs[0] = new Dog("小狗",1,"黑");
        dogs[1] = new Dog("小小狗",2,"白");
        for(int i=0;i<dogs.length;i++){
            System.out.println(dogs[i].name);
            dogs[i].eat();
        }

        Chick[] chicks = new Chick[1];
        chicks[0] = new Chick("小鸡",1,"黄");
        for(int i=0;i<chicks.length;i++){
            System.out.println(chicks[i].age);
            chicks[i].drink();
        }

        Fish[] fish = new Fish[2];
        fish[0] = new Fish("小鱼",1,"金");
        fish[1] = new Fish("小小鱼",2,"银");
        for(int i=0;i<fish.length;i++){
            System.out.println(fish[i].color);
            fish[i].swim();
        }

    }
}
